@layout("/common/_container.html",{plugins:["ztree"],js:["/assets/modular/system/menu/menu.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">菜单管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                               <select name="projectId" id="projectId" lay-verify="required">
                                <option value=""></option>
                                @if(isNotEmpty(projects)){
                                @for(item in projects){
                                <option value="${item.id}">${item.projectName}</option>
                                @}
                                @}
                                </select>

                            </div>

                            <div class="layui-inline">
                                <input id="menuName" class="layui-input" type="text" placeholder="菜单名称"/>
                            </div>

                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>

                                <button id="expandAll" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>展开所有</button>
                                <button id="foldAll" class="layui-btn icon-btn"><i class="layui-icon">&#xe656;</i>折叠所有</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="menuTable" lay-filter="menuTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>



<script type="text/html" id="tableBar">

    <div class="layui-btn-group">
    {{# if(d.edited==0){  }}
        <button type="button" class="layui-btn layui-btn-sm">
            <i class="layui-icon">&#xe702;</i>
        </button>
    {{# }else{  }}
    @if(shiro.hasPermission("sam:menu:edit")){
        <button type="button" class="layui-btn layui-btn-sm"  lay-event="edit">
            <i class="layui-icon">&#xe642;</i>
        </button>
    @}
    @if(shiro.hasPermission("sam:menu:delete")){
        <button type="button" class="layui-btn layui-btn-sm" lay-event="delete">
            <i class="layui-icon">&#xe640;</i>
        </button>
    @}
    @if(shiro.hasPermission("sam:menu:add")){
    {{# if(d.menuType==1){  }}
        <button type="button" class="layui-btn layui-btn-sm" lay-event="add">
            <i class="layui-icon">&#xe608;</i>
        </button>

        <!--资源管理 字段-->
        {{# if(d.authIdentification!=null && d.authIdentification!='' && d.resourceUrl!=null && d.resourceUrl!='' ){  }}
        <button  class="layui-btn layui-btn-sm"
                ew-href="{{d.resourceUrl}}">
            <i class="layui-icon">&#xe60a;</i>
        </button>
        {{# } }}
    </div>

    {{# } }}
    @}

    {{# } }}
</script>


@}
